#pragma once
#ifndef myIEventManager_h__
#define myIEventManager_h__

#include "../adapter/skyOS.h"

class myEventSender;
class myEvent;
class myTimer;
class myIEventManager;
class myApplication;
typedef TResult  (*EventCalledProc)(myIEventManager* manager,myEvent* event);

class myIEventManager : private Sky::TreeNode
{
	
public:
	myIEventManager():m_CallBack(vNull),m_Sender(vNull){}

	virtual TBool	handlePostEvent(myEventSender* sender,myEvent* event) = 0;

	virtual TResult handleSendEvent(myEventSender* sender,myEvent* event) = 0;
	//
	virtual TBool	getQueuedMessage(myEvent* event) = 0;
	TVoid			setEventSender(myEventSender* sender){m_Sender = sender;}
	myEventSender*	getEventSender(){return m_Sender;}
	virtual myTimer* getTimer() = 0;
	TVoid			setEventCallBack(EventCalledProc proc,TVoid* pData){m_CallBack = proc;m_CallBackData = pData;}
	virtual myApplication*	getApplication() = 0;
protected:
	myEventSender* m_Sender;
	EventCalledProc m_CallBack;
	TVoid*			m_CallBackData;
	myApplication*  m_pApp;

};

#endif // myIEventManager_h__
